<template>
    <div class="box">
        <div v-show="$store.state.loginshow" class="login">
            <div v-if="other" class="login_in">
                <div class="head tanxin">
                    <span>登录</span>
                    <span @click="closeLogin">X</span>
                </div>
                <div class="cen tanxin">
                    <img src="../assets/images/phone.png" alt="">
                    <div class="cen_in">
                        <h3>扫码登录</h3>
                        <img src="../assets/images/wx.png" alt="">
                        <p>使用 <a href="#">网易云音乐APP</a> 扫码登录</p>
                    </div>
                </div>
                <button @click="otherLogin">选择其它登录模式</button>
            </div>
            <div v-else class="phone">
                <div class="head tanxin">
                    <span>登录</span>
                    <span @click="closeLogin">X</span>
                </div>
                <div class="ph_cen tanxin">
                    <div class="cen_l">
                        <img src="../assets/images/phonePC.png" alt="">
                        <button>手机号登录</button>
                        <button>注册</button>
                    </div>
                    <diV class="cen_r">
                        <p><i class="iconfont icon-weixin"></i><span>微信登录</span></p>
                        <p><i class="iconfont icon-QQ-circle-fill"></i><span>QQ登录</span></p>
                        <p><i class="iconfont icon-weibo"></i><span>微博登录</span></p>
                        <p><i class="iconfont icon-youxiang"></i><span>网易邮箱账号登录</span></p>
                    </diV>
                </div>
                <div class="ph_bot tanxin">
                    <input type="checkbox"><label>同意</label><a href="#">《服务条款》</a><a href="#">《隐私政策》</a><a href="#">《儿童隐私政策》</a>
                    <img @click="goWx" width="52" src="../assets/images/gowx.png" alt="">
                </div>
            </div>
        </div>
    </div>
</template>

<script>
export default {
    data () {
        return {
            other: true,
        }
    },
    methods:{
        closeLogin(){
            this.$store.commit('unloginShow',false);
        },
        otherLogin(){
            this.other = false;
        },
        goWx(){
            this.other = true;
        }
    }
}
</script>
 
<style lang = "less" scoped>
    @import '@/assets/base.less';
    .login{
        width: 100%;
        height: 100%;
        position: fixed;
        top: 0;
        left: 0;
        background: rgba(0,0,0,0.3);
        .login_in{
            width: 530px;
            height: 375px;
            background: #fff;
            position: fixed;
            z-index: 2;
            left: 50%;
            top: 50%;
            transform: translate(-50%,-50%);
            border-radius: 10px;
            text-align: center;
            .head{
                justify-content: space-between;
                height: 40px;
                align-items: center;
                background: #2d2d2d;
                color: #fff;
                border-radius: 10px 10px 0 0;
                span{
                    font-size: 14px;
                    &:first-of-type{
                        margin-left: 20px;
                    }
                    &:last-of-type{
                        margin-right: 20px;
                        cursor: pointer;
                    }
                }
            }
            .cen{
                justify-content: center;
                margin: 30px 0;
                img{
                    width: 125px;
                    height: 220px;
                }
                .cen_in{
                    margin-left: 40px;
                    text-align: center;
                    img{
                        width: 128px;
                        height: 128px;
                        margin-bottom: 20px;
                    }
                    h3{
                        margin: 5px 0 15px 0;
                        font-size: 18px;
                        font-weight: normal;
                    }
                    p{
                        a{
                            text-decoration: none;
                            color: #0c73c2;
                        }
                    }
                }
            }
            button{
                width: 120px;
                height: 30px;
                line-height: 30px;
                border-radius: 15px;
                border: 0;
                border: 1px solid #ccc;
                cursor: pointer;
            }
        }
        .phone{
            width: 530px;
            height: 375px;
            background: #fff;
            position: fixed;
            z-index: 2;
            left: 50%;
            top: 50%;
            transform: translate(-50%,-50%);
            border-radius: 10px;
            text-align: center;
            .head{
                justify-content: space-between;
                height: 40px;
                align-items: center;
                background: #2d2d2d;
                color: #fff;
                border-radius: 10px 10px 0 0;
                span{
                    font-size: 14px;
                    &:first-of-type{
                        margin-left: 20px;
                    }
                    &:last-of-type{
                        margin-right: 20px;
                        cursor: pointer;
                    }
                }
            }
            .ph_cen{
                margin: 40px 0;
                justify-content: center;
                .cen_l{
                    margin-right: 20px;
                    button{
                        display: block;
                        width: 220px;
                        height: 30px;
                        cursor: pointer;
                        border: 0;
                        border: 1px solid #ccc;
                        border-radius: 5px;
                        &:first-of-type{
                            background: #0c73c2;
                            margin: 10px 0;
                        }
                    }
                    img{
                        width: 224px;
                        height: 120px;
                    }
                }
                .cen_r{
                    padding-left: 20px;
                    border-left: 1px solid #ccc;
                    p{
                        line-height: 50px;
                        display: flex;
                        align-items: center;
                        i{
                            display: inline-block;
                            font-size: 30px;
                            margin-right: 10px;
                            &.icon-weixin{
                                color: rgb(0, 180, 0);
                            }
                            &.icon-QQ-circle-fill{
                                color: rgb(0, 183, 255);
                            }
                            &.icon-weibo{
                                color: rgb(201, 0, 0);
                            }
                            &.icon-youxiang{
                                color: rgb(218, 0, 0);
                            }
                        }
                    }
                }
            }
            .ph_bot{
                line-height: 50px;
                height: 50px;
                align-items: center;
                justify-content: center;
                /* background: pink; */
                position: relative;
                img{
                    position: absolute;
                    right: 2px;
                    bottom: 0px;
                }
                a{
                    text-decoration: none;
                    color: #0c73c2;
                    margin: 0 3px;
                    &:hover{
                        text-decoration: underline;
                    }
                }
                label{
                    margin: 0 3px;
                }
            }
        }
    }
</style>